#include<stdio.h>
int main()
{
	int a,x,y,z;
	scanf("%d", &a);
	x=a/100;
	y=(a-x*100)/10;
	z=a-x*100-y*10;
	printf("%d %d %d",z,y,x);
	
	return 0;
}
